﻿@model workflowMVC.Models.ExcemptTuitionTaskStuModel

@{
    ViewBag.Title = "Miễn giảm học phí";
}
<h2 style="text-align:center">Tạo đơn miễn giảm học phí</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)

    <table class="ui-widget-content ui-corner-all" style="margin:auto;padding:5px">  
        <tr>
            <td>
                @Html.LabelFor(model => model.ParentName)
            </td>
            <td>
                @Html.TextBoxFor(model => model.ParentName)
            </td>
        </tr>
        <tr>
            <td></td>
            <td>
                @Html.ValidationMessageFor(model => model.ParentName)
            </td>
        </tr>
        <tr>
            <td>
                @Html.LabelFor(model => model.Hometown)
            </td>
            <td>
                @Html.TextBoxFor(model => model.Hometown)
            </td>
        </tr>
        <tr>
            <td></td>
            <td>
                @Html.ValidationMessageFor(model => model.Hometown)
            </td>
        </tr>

        <tr>
            <td>
                @Html.LabelFor(model => model.Type)
            </td>
            <td>
                @Html.TextBoxFor(model => model.Type)
            </td>
        </tr>
        <tr>
            <td></td>
            <td>
                @Html.ValidationMessageFor(model => model.Type)
            </td>
        </tr>
        
      
        <tr>
            <td>
                @Html.LabelFor(model => model.Street)
            </td>
            <td>
                @Html.TextBoxFor(model => model.Street)
            </td>
        </tr>
        <tr>
            <td></td>
            <td>
                @Html.ValidationMessageFor(model => model.Street)
            </td>
        </tr>
        <tr>
            <td>
                @Html.LabelFor(model => model.Ward)
            </td>
            <td>
                @Html.TextBoxFor(model => model.Ward)
            </td>
        </tr>
        <tr>
            <td></td>
            <td>
                @Html.ValidationMessageFor(model => model.Ward)
            </td>
        </tr>

        <tr>
            <td>
                @Html.LabelFor(model => model.District)
            </td>
            <td>
                @Html.TextBoxFor(model => model.District)
            </td>
        </tr>
        <tr>
            <td></td>
            <td>
                @Html.ValidationMessageFor(model => model.District)
            </td>
        </tr>

        <tr>
            <td>
                @Html.LabelFor(model => model.Province)
            </td>
            <td>
                @Html.TextBoxFor(model => model.Province)
            </td>
        </tr>
        <tr>
            <td></td>
            <td>
                @Html.ValidationMessageFor(model => model.Province)
            </td>
        </tr>
        
        <tr>
            <td>
                @Html.LabelFor(model => model.Note)
            </td>
            <td>
                @Html.TextAreaFor(model => model.Note)
            </td>
        </tr>
        <tr>
            <td></td>
            <td>
                @Html.ValidationMessageFor(model => model.Note)
            </td>
        </tr>
        
        <tr>
            <td></td>
            <td>
            <div class="buttonset">
                <input type="submit" value="Gửi" />
                <a href="#" class="OpenWindow">Xem Mẫu Đơn</a>
            </div>
            </td>
        </tr>
        
    </table>
}

<script type="text/javascript">
    $(document).ready(function () {
        $(".OpenWindow").live("click", function (event) {
            var form = $("form");
            $.ajax({
                url: "@ViewBag.FormSource",
                type: "PUT",
                data: form.serialize(),
                success: function (data) {
                    callback(data);
                }
            });
        });
    });
</script>